/*  1:   */ package com.atomikos.datasource.xa.session;
/*  2:   */ 
/*  3:   */ import com.atomikos.datasource.xa.XATransactionalResource;
/*  4:   */ import com.atomikos.icatch.CompositeTransaction;
/*  5:   */ import com.atomikos.icatch.HeuristicMessage;
/*  6:   */ import com.atomikos.icatch.TxState;
/*  7:   */ import javax.transaction.xa.XAResource;
/*  8:   */ 
/*  9:   */ class NotInBranchStateHandler
/* 10:   */   extends TransactionContextStateHandler
/* 11:   */ {
/* 12:   */   NotInBranchStateHandler(XATransactionalResource resource, XAResource xaResource)
/* 13:   */   {
/* 14:49 */     super(resource, xaResource);
/* 15:   */   }
/* 16:   */   
/* 17:   */   TransactionContextStateHandler checkEnlistBeforeUse(CompositeTransaction ct, HeuristicMessage hmsg)
/* 18:   */     throws InvalidSessionHandleStateException
/* 19:   */   {
/* 20:54 */     TransactionContextStateHandler ret = null;
/* 21:55 */     if ((ct != null) && (ct.getProperty("com.atomikos.icatch.jta.transaction") != null))
/* 22:   */     {
/* 23:57 */       if (TxState.MARKED_ABORT.equals(ct.getState())) {
/* 24:59 */         throw new InvalidSessionHandleStateException("Transaction is marked for rollback only or has timed out");
/* 25:   */       }
/* 26:66 */       ret = new BranchEnlistedStateHandler(getXATransactionalResource(), ct, getXAResource(), hmsg);
/* 27:   */     }
/* 28:69 */     return ret;
/* 29:   */   }
/* 30:   */   
/* 31:   */   TransactionContextStateHandler sessionClosed()
/* 32:   */   {
/* 33:75 */     return new TerminatedStateHandler();
/* 34:   */   }
/* 35:   */   
/* 36:   */   TransactionContextStateHandler transactionTerminated(CompositeTransaction ct)
/* 37:   */   {
/* 38:80 */     return null;
/* 39:   */   }
/* 40:   */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions-jta\3.7.0\transactions-jta-3.7.0.jar
 * Qualified Name:     com.atomikos.datasource.xa.session.NotInBranchStateHandler
 * JD-Core Version:    0.7.0.1
 */